package study.factoryBeanTest;

import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import study.config.AppConfig;

/**
 * @author: chengchao
 * @description:
 * @date: create in 2021/9/15
 **/
public class FactoryBeanTest {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);

        ConfigurableListableBeanFactory factory = applicationContext.getBeanFactory();

        FactoryBeanInfo factoryBeanInfo = (FactoryBeanInfo) factory.getBean("&factoryBeanInfo");
        factoryBeanInfo.info();
    }
}
